package com.gwtjs.hbm2xml.spring;

import java.util.ArrayList;
import java.util.List;

public class CodeGenerator {
	private static String outputPath;
	private static String propertiesPath;
	private static String outputFileName;
	private static List<String> hbms = new ArrayList<String>();
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		for (String arg : args) {
			if(arg.startsWith("--output=")){
				outputPath = arg.substring(9);
			}else if(arg.startsWith("--outputFileName=")){
				outputFileName = arg.substring(17);
			}else if(arg.startsWith("--propertyPath=")){
				propertiesPath = arg.substring(15);
			}else{
				hbms.add(arg);
			}
		}
		//System.out.println(outputPath+"/"+outputFileName+"\n"+propertiesPath+"\n"+hbms);
		Helper.getInstance().generatorHelper(outputPath+"/"+outputFileName,propertiesPath,hbms);

	}

}
